#include "DataClass.h"
#include<iostream>
#include<string>
#include<cstdlib>
#include<ctime>
int* DataClass::timeRandom(int n,int front,int rear) {
	int* num = new int[n];
	srand((unsigned)time(nullptr));
	for (int i = 0; i < n; i++)
		num[i] = rand() % (rear - front + 1) + front;
	return num;
}
int* DataClass::constRandom(int n, int front, int rear) {
	int* num = new int[n];
	for (int i = 0; i < n; i++)
		num[i] = rand() % (rear - front + 1) + front;
	return num;
}
void DataClass::putData(int* num, int front, int rear, std::string str) {
	std::cout << str;
	for (int i = front; i < rear; i++)
		std::cout << num[i] << " ";
	std::cout << std::endl;
}